﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BankSite.Sites.Transfers
{
    public partial class OneTimeTransfer : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void CurrencyDropdownEDS_QueryCreated(object sender, QueryCreatedEventArgs e)
        {
            var Currencies = e.Query.Cast<Waluty>();
            e.Query = from currency in Currencies where currency.id == 120 select currency;  // jak na razie limitujemy do PLN; będzie trzeba zrobić rozliczanie międzywalutowe
        }

        protected void MakeTransferEDS_Inserting(object sender, EntityDataSourceChangingEventArgs e)
        {
            
        }

        protected void OneTimeTransferFV_DataBound(object sender, EventArgs e)
        {
            TextBox idKlienta = this.OneTimeTransferFV.FindControl("id_klient") as TextBox;
            TextBox idRodzaj = this.OneTimeTransferFV.FindControl("id_rodzaj") as TextBox;
            if (idKlienta != null && idRodzaj != null)
            {
                idKlienta.Text = "";// Session["ClientID"];
                idRodzaj.Text = "";
            }
        }
    }
}